<template>
	<view class="about" style="">
		<!-- <view v-if="hasLogin"> -->
		<!-- 导航 -->
		<!-- <u-navbar back-icon-color="#000000" title="邀请好友" title-color="#3F3F3F" :border-bottom="false" :title-bold="true" :background="background"></u-navbar> -->
		<u-navbar back-text="邀请好友" :border-bottom="false" :back-text-style="textStyle" back-icon-color="#000000" style="font-weight: bold;font-family: PingFang SC;"></u-navbar>
		<!-- end -->
		<view style="line-height: 0;width: 100%;">
			<image src="https://beedao.oss-cn-beijing.aliyuncs.com/4c5e479ac43f4ecebcd608a9109d18be.png" mode="" style="width: 100%;height: 1696rpx;display: block;"></image>
		
		</view>
		<!-- :style="{top:heighthq}" -->
		<view style="width: 100%;margin: auto;position: absolute;z-index: 99;top: 60%;">
			<view style="width: 92%;margin: auto;">
				<view style="width: 100%;margin: auto;background-color:#f44b02;padding: 20rpx 0rpx;border-radius: 24rpx;">
					<view class="top" style="width: 95%;margin: auto;background-color:#fce4c5;border-radius: 24rpx;padding: 20rpx 0rpx;">
						<view style="width: 33%;" class="line">
							<view>
								{{prices.brokerage}}
							</view>
							<view style="margin-top: 10rpx;">
								总收入
							</view>
						</view>
						<!-- <view class="line"></view> -->
						<view style="width: 33%;" class="line"  @tap="jump('/pageageA/personal/mingxi?type='+1)">
							<view>
								{{prices.balances}}
							</view>
							<view  style="margin-top: 10rpx;">
								余额
							</view>
						</view>
					<!-- 	<view class="line"></view> -->
						<view style="width: 33%;" @tap="jump('/pageageA/personal/mingxi?type='+2)">
							<view>
								{{prices.frozenBalances}}
							</view>
							<view style="margin-top: 10rpx;">
								冻结金额
							</view>
						</view>
					</view>
				</view>
				<view style="display: flex;width: 100%;">
					<view  class="please" style="width: 74%;text-align: right;" >
						<view @tap="jump('/pageageA/personal/withdraw?money='+ prices.balances)" v-show="prices.teamLeader == 1" style="margin-right: 18rpx;" >提现</view> 
					</view>
					<view @tap="jump('/pageageA/personal/mingxi?type='+3)" class="please" style="width: 26%;text-align: right;">
						<view style="margin-right: 18rpx;">邀请明细 <u-icon name="arrow-right" color="#FFFFF"   size="28"></u-icon> </view> 
						<!-- <image src="../../static/icon/down%20arrow.png" mode="" style="width: 24rpx;height: 24rpx;margin-left: 18rpx;"></image> -->
					</view>
				</view>
				
				
				
				<view style="width: 100%;margin:80rpx auto;background-color:#f44b02;border-radius: 24rpx;padding-bottom: 20rpx;">
				
					<view style="width: 95%;margin: auto;background-color:#fce4c5;border-radius: 24rpx;position: relative;padding: 60rpx 0rpx 30rpx 0rpx;">
						<view class="guize" style="position: absolute;left: 50%;transform: translateX(-50%);top: -60rpx;">
							活动规则
						</view>
						<view class="fott">
							<view class="list">
								<view class="listOne">1</view>
								<view class="listTwo">用户可以邀请好友注册使用必到平台</view> 
							</view>
							<view class="list">
								<view class="listOne">2</view>
								<view class="listTwo">被你邀请的朋友每次下单，你将会获得实付款1%的奖励</view> 
							</view>
							<!-- <view class="list">
								<view class="listOne">3</view>
								<view class="listTwo">在平台下单时，可以使用奖励抵扣部分订单金额</view> 
							</view> -->
							<view class="list">
								<view class="listOne">3</view>
								<view class="listTwo">奖励的余额可以在平台积分商城中购买商品</view> 
							</view>
							<view class="">
								<button open-type="share"  class="button">立即邀请</button>
							</view>
						</view>
					</view>
				</view>
			</view>		
			<u-toast ref="uToast" />
		</view>
	<!-- 	<view class="top" >
			<view>
				<view>
					{{prices.brokerage}}
				</view>
				<view style="margin-top: 10rpx;">
					总收入
				</view>
			</view>
			<view class="line"></view>
			<view @tap="jump('/pageageA/personal/mingxi?type='+1)">
				<view>
					{{prices.balances}}
				</view>
				<view  style="margin-top: 10rpx;">
					余额
				</view>
			</view>
			<view class="line"></view>
			<view @tap="jump('/pageageA/personal/mingxi?type='+2)">
				<view>
					{{prices.frozenBalances}}
				</view>
				<view style="margin-top: 10rpx;">
					冻结金额
				</view>
			</view>
		</view> -->
		<!-- <view @tap="jump('/pageageA/personal/mingxi?type='+3)" class="please" >
			<view>邀请明细</view> 
			<image src="../../static/icon/down%20arrow.png" mode="" style="width: 24rpx;height: 24rpx;margin-left: 18rpx;"></image>
		</view>
		<view class="middle">
			活动规则
		</view> -->
		<!-- <view class="fott">
			<view class="list">
				<view class="listOne">1</view>
				<view class="listTwo">用户可以邀请好友注册使用必到平台</view> 
			</view>
			<view class="list">
				<view class="listOne">2</view>
				<view class="listTwo">被你邀请的朋友每次下单，你将会获得实付款1%的奖励</view> 
			</view>
			<view class="list">
				<view class="listOne">3</view>
				<view class="listTwo">在平台下单时，可以使用奖励抵扣部分订单金额</view> 
			</view>
			<view class="list">
				<view class="listOne">4</view>
				<view class="listTwo">奖励的月可以在平台积分商城中购买商品</view> 
			</view>
			<view class="">
				<button open-type="share"  class="button">立即邀请</button>
				
			</view>
		</view> -->
	</view>
</template>

<script>
	var that;
	export default {
		data() {
			return {
				prices:'',
				userId:'',
				heighthq:'',
				background:{
					backgroundColor: '#fca800',
				},
			};
		},
		onLoad() {
		
			that=this;
			var userInfo = JSON.parse(uni.getStorageSync('userinfo'));
			that.userId = userInfo.userId
			
			
		},
		onShareAppMessage(res) {
		  if (res.from === 'button') {// 来自页面内分享按钮
		  }
		  let opts = {
		  	way: true, //true JSON请求；false 表单请求
		  	method: 'post',
		  	url: 'common/insertShareLog'
		  };
		  let data = {};
		  this.http.httpTokenRequest(opts, data).then(res => {
		  	//分享日志，不需要处理
		  });
		  return {
		    title: '邀请好友来赚钱',
			imageUrl:'https://beedao.oss-cn-beijing.aliyuncs.com/f42d22f3f5454a0aa019b190b0f4e955.png',
		    path:'/pages/login/login?id='+that.userId
		  }
		},
		onShow() {
			this.balance_price()
		},
		methods: {
			 
			balance_price(){
				let opts = {
					way: true, //true JSON请求；false 表单请求
					method: 'post',
					url: 'user-stream/balance',
				};
				let data = {
					 
				};
				this.http.httpTokenRequest(opts, data).then(res => {
					//打印请求返回的数据 
					if (res.code == "200") {
					this.prices=res.data
					}else{
						this.$refs.uToast.show({
							title: res.message,
							type: 'error'
						})
					}
				});
			},
			jump(url){
				uni.navigateTo({
					url:url
				})
			},
			yaoqing(){
				uni.navigateTo({
					url:'mingxi'
				})
			}
		}
	};
</script>

<style scoped lang="scss">
	.top{
		// background-color: #f44b02;
		// background-color: #fce4c5;
		// position: absolute;z-index: 99;
		display: flex;
		text-align: center;
		justify-content: space-between;
		// width: 72%;
		// top: 61%;
		// left: 12%;
		color: #F44B02;font-size: 30rpx;font-weight: 400;
	}
	.line{
		
		border-right: 2rpx solid #F44B02;height: 68rpx;
	}
	.please{
		padding-top: 10rpx;
		color: #FFFFFF;
		text-align: right;
		
	}
	.middle{
		color: #FFFFFF;
		padding-top: 10rpx;
		font-size: 30rpx;
		text-align: center;
		// letter-spacing: 10rpx;
	}
	.fott{
		// position: absolute;top:83%;left: 18%;
		width: 75%;
		margin: auto;
		font-size: 24rpx;color: #FF6009;
	}
	.fott .list{
		display: flex;margin-top: 14rpx;
	}
	.fott .list .listOne{
		width: 30rpx;height: 30rpx;background-color: #FC5914;border-radius: 30rpx;color: #FFFFFF;text-align: center;line-height: 30rpx;font-size: 24rpx;
	}
	.fott .list .listTwo{
		width: 89%;
		margin-left: 15rpx;
		  text-align: justify;
		 // text-align-last: justify;
		// padding-left: 30rpx;
		margin-bottom: 10rpx;
	}
	.guize{
		border: 2rpx solid #FBA373;
		background: linear-gradient(180deg, #FBA373 0%, #F44B02 100%);width: 450rpx;padding: 12rpx 0;text-align: center;border-radius: 34rpx;margin: auto;color: #FFFFFF;height: 66rpx;line-height: 38rpx;margin-top: 20rpx;font-size: 30rpx;font-weight: 400;
	}
	.button{
		background: linear-gradient(180deg, #FBA373 0%, #FF5A01 100%);width: 450rpx;padding: 12rpx 0;text-align: center;border-radius: 34rpx;margin: auto;color: #FFFFFF;height: 66rpx;line-height: 44rpx;margin-top: 20rpx;font-size: 30rpx;font-weight: 400;
	}
</style>
